<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 100%;
            height: 2000px;
        }
        .div{
            width: 100px;
            height: 30px;
            background: black;
            border: 1px solid red;
            position: fixed;
            bottom:50px;
            right: 100px;
        }
        div a{
            text-decoration: none;
            color: wheat;
        }
    </style>
</head>
<body>
    <div id="top" class="box">
        <div class="div">
            <a href="#top">返回页面顶部</a>
        </div>
    </div>
    
</body>
</html>